package com.symone.webcms.mapper;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.symone.webcms.model.Permission;
import com.symone.webcms.model.Role;
import com.symone.webcms.model.vo.PermissionVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Set;

/**
 * <p>
 * 系统用户组 Mapper 接口
 * </p>
 *
 * @author ArcherChu
 * @since 2018-10-30
 */
public interface RoleMapper extends BaseMapper<Role> {

    List<PermissionVO> fetchAllPermissions();

    Set<PermissionVO> fetchPermissionsById(Long id);

    void clearPermissionByRoleId(Long roleId);

    void insertPermission(@Param("roleId") Long roleId,@Param("shiroCode") String shiroCode,@Param("url") String url);
}
